home *** CD-ROM | disk | FTP | other *** search
- Path: news.mira.net.au!news
- From: davidw@werple.net.au (David White)
- Newsgroups: comp.lang.c++
- Subject: Re: Q: static private variables/functions
- Date: 2 Apr 1996 19:43:30 +1000
- Organization: Werple Internet, Melbourne
- Message-ID: <4jqss2$jc1@werple.net.au>
- References: <op3f6ntuoy.fsf@sweetbay.will.uiuc.edu>
- NNTP-Posting-Host: werplez.mira.net.au
-
- Dragos-Anton Manolescu <manolesc@uiuc.edu> writes:
-
-
- >class Movie {
- >private:
- > // Jpeg playback class variables
- > static XtAppContext appContext;
- > // Private functions
- > static void PrivateXtLoop(void);
- >[stuff deleted]
- >};
-
- >Everything compiles Ok but apparently the linker is not able to find
- >the class variables:
-
- Did you define the private variable somewhere? The class only contains
- its declaration. It needs a definition in a source file also, e.g.,
-
- XtAppContext Movie::appContext; // = some_initializer (if necessary)
-
- David White
- davidw@werple.mira.net.au
-